//
//  SellSortCell.m
//  LoveCar
//
//  Created by Xue Senhong on 15/5/25.
//  Copyright (c) 2015年 薛森鸿. All rights reserved.
//

#import "SellSortCell.h"

@implementation SellSortCell

- (void)dealloc
{
    [_nameLabel release];
    [_picImage release];
    [_priceLabel release];
    [_rankLabel release];
    [_sellLabel release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addSubViews];
    }
    return self;
}

- (void)addSubViews
{
    self.picImage = [[UIImageView alloc] initWithFrame:CGRectMake(kScreenWidth * 10 / 375, kScreenHeight * 25 / 667, kScreenWidth * 90 / 375, kScreenHeight * 55 / 667)];
    [self addSubview:self.picImage];
    [_picImage release];
    
    self.rankLabel = [[UILabel alloc] initWithFrame:CGRectMake(kScreenWidth * 10 / 375, 0, kScreenWidth * 20 /375, kScreenHeight * 25 / 667)];
    self.rankLabel.font = [UIFont systemFontOfSize:15];
    self.rankLabel.textColor = [UIColor whiteColor];
    self.rankLabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.rankLabel];
    [_rankLabel release];
    
    self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(kScreenWidth * 110 / 375, kScreenHeight * 20 / 667, kScreenWidth * 200 / 375, kScreenHeight * 17 / 667)];
    [self addSubview:self.nameLabel];
    [_nameLabel release];
    
    self.priceLabel = [[UILabel alloc] initWithFrame:CGRectMake(kScreenWidth * 110 / 375, kScreenHeight * 50 / 667, kScreenWidth * 200 / 375, kScreenHeight * 17 / 667)];
    self.priceLabel.font = [UIFont systemFontOfSize:15];
    self.priceLabel.textColor = [UIColor redColor];
    [self addSubview:self.priceLabel];
    [_priceLabel release];
    
    self.sellLabel = [[UILabel alloc] initWithFrame:CGRectMake(kScreenWidth * 110 / 375, kScreenHeight * 80 / 667, kScreenWidth * 200 / 375, kScreenHeight * 17 / 667)];
    self.sellLabel.font = [UIFont systemFontOfSize:15];
    self.sellLabel.textColor = [UIColor grayColor];
    [self addSubview:self.sellLabel];
    [_sellLabel release];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
